package org.example.what_mall.vo;

import lombok.Data;
import org.example.what_mall.entity.User;

@Data
public class UserDataVO {
    private Integer id;
    private String email;
    private String nickname;
    private String headimg;
    private String recipient;
    private String address;
    private String phone;

    public static UserDataVO of(User user) {
        UserDataVO vo = new UserDataVO();

        vo.setId(user.getId());
        vo.setEmail(user.getEmail());
        vo.setNickname(user.getNickname());
        vo.setHeadimg(user.getHeadimg());
        vo.setRecipient(user.getRecipient());
        vo.setAddress(user.getAddress());
        vo.setPhone(user.getPhone());

        return vo;
    }
}
